package zzs.generalframework.coder.core.encoder.temp.console.dao;

import zzs.generalframework.coder.common.model.ClazzBO;

/**
 * @title
 * @description
 * @project zzs-coder
 * @package zzs.generalframework.coder.core.encoder.temp.console.dao
 * @author zzs
 * @date 2018年1月31日
 * @version 1.0
 */
public class InterfaceCoder
{

	public String createFile(ClazzBO clazzBO)
	{
		StringBuffer returnBuffer = new StringBuffer();

		/**
		 * 创建民族
		 * 
		 * @param nationalityPO
		 * @return
		 */
		// public Boolean create(NationalityPO nationalityPO);

		returnBuffer.append("/**").append("\n");
		returnBuffer.append("* 创建").append(clazzBO.getEntityName()).append("信息").append("\n");
		returnBuffer.append("* ").append("\n");
		returnBuffer.append("* @param ").append(clazzBO.getEntityCodeCamal()).append("PO").append("\n");
		returnBuffer.append("* @return").append("\n");
		returnBuffer.append("*/").append("\n");
		returnBuffer.append("public boolean insert(").append(clazzBO.getEntityCode()).append("PO ").append(clazzBO.getEntityCodeCamal()).append("PO);").append("\n");

		/**
		 * 更新民族
		 * 
		 * @param nationalityPO
		 * @return
		 */
		// public boolean update(NationalityPO nationalityPO);
		returnBuffer.append("/**").append("\n");
		returnBuffer.append(" * 更新").append(clazzBO.getEntityName()).append("信息").append("\n");
		returnBuffer.append("*").append("\n");
		returnBuffer.append("* @param ").append(clazzBO.getEntityCodeCamal()).append("PO").append("\n");
		returnBuffer.append("* @return").append("\n");
		returnBuffer.append("*/").append("\n");
		returnBuffer.append("public boolean update(").append(clazzBO.getEntityCode()).append("PO ").append(clazzBO.getEntityCodeCamal()).append("PO);").append("\n");

		/**
		 * 获取民族
		 * 
		 * @param nationalityInfo
		 * @return
		 */
		// public List<NationalityPO> findByConditions(NationalityInfo
		// nationalityInfo);
		returnBuffer.append("/**").append("\n");
		returnBuffer.append("* 查询").append(clazzBO.getEntityName()).append("信息").append("\n");
		returnBuffer.append("*").append("\n");
		returnBuffer.append("* @param ").append(clazzBO.getEntityCodeCamal()).append("Info").append("\n");
		returnBuffer.append("* @return").append("\n");
		returnBuffer.append("*/").append("\n");
		returnBuffer.append("public List<").append(clazzBO.getEntityCode()).append("PO> select(").append(clazzBO.getEntityCode()).append("Info ").append(clazzBO.getEntityCodeCamal()).append("Info);").append("\n");

		/**
		 * 删除民族
		 * 
		 * @param nationalityPO
		 * @return
		 */
		// public boolean remove(NationalityPO nationalityPO);
		returnBuffer.append("/**").append("\n");
		returnBuffer.append("* 删除").append(clazzBO.getEntityName()).append("信息").append("\n");
		returnBuffer.append("*").append("\n");
		returnBuffer.append("* @param ").append(clazzBO.getEntityCodeCamal()).append("PO").append("\n");
		returnBuffer.append("* @return").append("\n");
		returnBuffer.append("*/").append("\n");
		returnBuffer.append("public boolean delete(").append(clazzBO.getEntityCode()).append("PO ").append(clazzBO.getEntityCodeCamal()).append("PO);").append("\n");

		/**
		 * 统计
		 * 
		 * @param nationalityPO
		 * @return
		 */
		// public Long count(NationalityPO nationalityPO);
		returnBuffer.append("/**").append("\n");
		returnBuffer.append("* 统计").append(clazzBO.getEntityName()).append("信息").append("\n");
		returnBuffer.append("* ").append("\n");
		returnBuffer.append("* @param ").append(clazzBO.getEntityCodeCamal()).append("PO").append("\n");
		returnBuffer.append("* @return").append("\n");
		returnBuffer.append("*/").append("\n");
		returnBuffer.append("public Long count(").append(clazzBO.getEntityCode()).append("PO ").append(clazzBO.getEntityCodeCamal()).append("PO);").append("\n");

		return returnBuffer.toString();
	}

}
